]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Properly handle zero spacing in the WorkspaceLayout
authorJonas Dreßler <verdre@v0yd.nl>
Mon, 8 Feb 2021 17:58:27 +0000 (18:58 +0100)
committerJonas Dreßler <verdre@v0yd.nl>
Sun, 21 Feb 2021 16:01:07 +0000 (17:01 +0100)
It should be allowed to set this._spacing to 0 and thus pass 0 as
rowSpacing or colSpacing to this._adjustSpacingAndPadding(). The current
if-condition there won't add the oversize to the spacing in case 0 is
passed though.

So change that if-condition and explicitely check for null instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1698>

js/ui/workspace.js

index ba632153b355003d33bad0599350ba5e8f2451e5..c7021fe5acff925636f2b254c5fa7ecda0d28dfd 100644 (file)
@@ -463,9 +463,9 @@ var WorkspaceLayout = GObject.registerClass({
         const [topOversize, bottomOversize] = window.chromeHeights();
         const [leftOversize, rightOversize] = window.chromeWidths();
 
-        if (rowSpacing)
+        if (rowSpacing !== null)
             rowSpacing += topOversize + bottomOversize;
-        if (colSpacing)
+        if (colSpacing !== null)
             colSpacing += Math.max(leftOversize, rightOversize);
 
         if (containerBox) {